// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RoleInstanceEndpointWrapper.cs" company="AzureContrib (Open source library http://azurecontrib.codeplex.com)">
//   Microsoft Public License (Ms-PL)
// </copyright>
// <summary>
//   Exception for errors when handling Windows Azure Cloud Drives.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System.Net;
using Microsoft.WindowsAzure.ServiceRuntime;

namespace AzureContrib.WindowsAzure.ServiceRuntime
{
	internal class RoleInstanceEndpointWrapper : IRoleInstanceEndpoint
	{
		private readonly RoleInstanceEndpoint roleInstanceEndpoint;

		public RoleInstanceEndpointWrapper(RoleInstanceEndpoint roleInstanceEndpoint)
		{
			this.roleInstanceEndpoint = roleInstanceEndpoint;
		}

		public IPEndPoint IPEndpoint
		{
			get { return roleInstanceEndpoint.IPEndpoint; }
		}

		public string Protocol
		{
			get { return roleInstanceEndpoint.Protocol; }
		}

		public IRoleInstance RoleInstance
		{
			get { return new RoleInstanceWrapper(roleInstanceEndpoint.RoleInstance); }
		}
	}
}